package org.mj.im.sdk.consumer;

import cn.hutool.json.JSONObject;
import org.mj.im.common.constants.IMConstants;
import org.mj.im.common.model.IMSendResult;

public class BaseMessageResultConsumer {
    /**
     * 解析数据
     */
    protected IMSendResult<?> getResultMessage(String msg){
        String eventStr = new JSONObject(msg).getStr(IMConstants.MSG_KEY);
        return new JSONObject(eventStr).toBean(IMSendResult.class);
    }
}
